package im.oen.boot.api.constant;

import im.oen.boot.common.utils.Checker;

/**
 * @author Kevin.Xu
 */
public class OenApiConst {

    private static OenApiConst _instance = null;

    public static void instance(String projectUri, String apiUri) {
        _instance = new OenApiConst(projectUri, apiUri);
    }

    public static OenApiConst getInstance() {
        return _instance;
    }

    private String projectUri;
    private String apiUri;

    private OenApiConst(String projectUri, String apiUri) {
        this.projectUri = projectUri;
        this.apiUri = apiUri;
    }

    public String getProjectUri() {
        return projectUri;
    }

    public String getApiUri() {
        return apiUri;
    }

    public String getUri() {
        return (Checker.isEmpty(this.projectUri) ? "" : this.projectUri) + (Checker.isEmpty(this.apiUri) ? "" : this.apiUri);
    }
}
